package com.xiaoshuidi.cloud.module.finance.mq.consumer;

import com.xiaoshuidi.cloud.module.finance.service.finance.FinanceBankTransferService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.function.Consumer;

@Slf4j
@Component("bankTransfer")
public class FinanceBankTransferConsumer implements Consumer<String> {
    @Resource
    private FinanceBankTransferService financeBankTransferService;
    @Override
    public void accept(String s) {
        log.info("收到银企直连推送消息 {}", s);
        financeBankTransferService.send(s);
    }
}
